import myTheme from '../src/utils/theme/antd';
import pageRoutes from './routes';
// import px2rem from 'postcss-plugin-px2rem';
const umiPluginReact = [
  //umi包含插件
  'umi-plugin-react',
  {
    //开启antd
    antd: true,
    // hd: true,
    //开启dva
    dva: {
      hmr: true,
    },
    //国际化
    locale: {
      enable: true, // default false
      default: 'zh-CN', // default zh-CN
      baseNavigator: true, // default true, when it is true, will use `navigator.language` overwrite default
    },
    //动态加载路由相关配置
    dynamicImport: false,
  },
];

export default {
  plugins: [umiPluginReact],
  theme: myTheme,
  history: 'hash',
  publicPath: './',
  targets: {
    ie: 11,
  },
  // 路由配置
  routes: pageRoutes,
  // 主题配置
  ignoreMomentLocale: true,
  manifest: {
    basePath: '/',
  },
  outputPath: './materialManagement',
}
